{%TEMPLATE->struct/head%}
{%TEMPLATE->struct/menu%}
<h2>Preprocessors</h2>
{%TEMPLATE->struct/messages%}
<div class="card">
  <div class="table-responsive">
    <table class="table table-bordered">
      <tr>
        <td colspan="3" class="text-right">
          <a href="preprocessors.php?new=true" class="btn btn-success">Add</a>
        </td>
      </tr>
		  <tr>
			  <th style="width: 150px;">Preprocessor ID</th>
			  <th>Name</th>
			  <th style="width: 100px;">Action</th>
		  </tr>
		  {{FOREACH preprocessor;[[preprocessors]]}}
			  <tr>
				  <td><a href="preprocessors.php?id=[[preprocessor.getId()]]">[[preprocessor.getId()]]</a></td>
				  <td><a href="preprocessors.php?id=[[preprocessor.getId()]]">[[htmlentities([[preprocessor.getName()]], ENT_QUOTES, "UTF-8")]]</a></td>
				  <td>
					  {{IF [[accessControl.hasPermission([[$DAccessControl::SERVER_CONFIG_ACCESS]])]]}}
						  <form style="float: left;" action="preprocessors.php" method="POST" onSubmit="if (!confirm('Really delete preprocessor [[htmlentities([[preprocessor.getName()]], ENT_QUOTES, 'UTF-8')]]?')) return false;">
							  <input type="hidden" name="action" value="[[$DPreprocessorAction::DELETE_PREPROCESSOR]]">
							  <input type="hidden" name="preprocessorId" value="[[preprocessor.getId()]]">
							  <input type="hidden" name="csrf" value="[[csrf]]">
                <button type="submit" class='btn btn-danger' data-toggle="tooltip" data-placement="top" title="Delete"><i class="fas fa-trash" aria-hidden="true"></i></button>
						  </form>
					  {{ENDIF}}
				  </td>
			  </tr>
		  {{ENDFOREACH}}
	  </table>
  </div>
</div>
{%TEMPLATE->struct/foot%}